package com.ruoyi.db.sms.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 团购活动对象 sms_groupon
 *
 * @author yfy
 * @date 2020-04-27
 */

@ApiModel("团购活动实体类")
@Data
@EqualsAndHashCode(callSuper=true)
public class SmsGroupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("团购活动ID")
    private Long id;

    @ApiModelProperty("关联的订单ID")
    @Excel(name = "关联的订单ID")
    @NotBlank(message = "关联的订单ID不能为空")
    private Long orderId;

    @ApiModelProperty("参团团购活动ID(是开团用户是0)")
    @Excel(name = "参团团购活动ID(是开团用户是0)")
    private Long offeredGrouponId;

    @ApiModelProperty("团购规则ID")
    @Excel(name = "团购规则ID")
    @NotBlank(message = "团购规则ID不能为空")
    private Long rulesId;

    @ApiModelProperty("用户ID")
    @Excel(name = "用户ID")
    @NotBlank(message = "用户ID不能为空")
    private Long userId;

    @ApiModelProperty("团购分享图片地址")
    @Excel(name = "团购分享图片地址")
    @Size(min = 0, max = 255, message = "团购分享图片地址长度不能超过255个字符")
    private String shareUrl;

    @ApiModelProperty("开团用户ID")
    @Excel(name = "开团用户ID")
    @NotBlank(message = "开团用户ID不能为空")
    private Long creatorUserId;

    @ApiModelProperty("开团时间")
    @Excel(name = "开团时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime creatorUserTime;

    @ApiModelProperty("团购活动状态（0开团未支付 1开团中 2开团失败）")
    @Excel(name = "团购活动状态", readConverterExp = "0=开团未支付,1=开团中,2=开团失败")
    private Integer status;

    @ApiModelProperty("创建时间")
    private LocalDateTime addTime;

    @ApiModelProperty("逻辑删除")
    private Integer deleted;

}
